package fastjson.book.bean.serializer;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import org.junit.Test;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializeFilter;
import com.alibaba.fastjson.serializer.SerializerFeature;

import fastjson.book.bean.CommonEnum;
import fastjson.book.bean.Dept;
import fastjson.book.bean.UserBean;

public class SerializerFeatureTest1 {

	
	/**
	* 测试参数功能
	* @title: testSerializeFeatureFunction 
	* @Author: zhaoweiyong
	* @Date: 2017年9月5日下午2:54:16
	 */
	@Test
	public void testSerializeFeatureFunction(){
		Dept dept = new Dept();
		dept.setName("过客部");
		dept.setAddress("弱水之畔");
		dept.setId(UUID.randomUUID().toString());
		System.out.println(JSON.toJSONString(dept));
	}
	
	
	public String formatLength(int formatLen, String insert, String binaryStr){
		int len = binaryStr.length();
		StringBuilder zeroStringBuilder = new StringBuilder();
		for(int i=0;i<(formatLen-len);i++){
			zeroStringBuilder.append(insert);
		}
		return zeroStringBuilder.append(binaryStr).toString();
	}
}
